package com.alpha.mybaits.model;


import java.util.Date;

import javax.persistence.Id;

public class TcTaskInfo {
	
	/**
	 * 未触发的任务
	 */
	public static final Integer NOT_TRIGGER = 0;
	
	/**
	 * 已加载任务
	 */
	public static final Integer LOADED_TASK = 1;
	
	/**
	 * 已触发的任务
	 */
	public static final Integer HAD_TRIGGER = 2;

	/**
	 * 修改的任务
	 */
	public static final Integer MODIFY_TRIGGER  = 3;
	
	/**
	 * 停止的任务
	 */
	public static final Integer STOPPED_TRIGGER  = 4;
	
	/**
	 * 触发失败的任务
	 */
	public static final Integer DEFEAT_TRIGGER  = 5;
	
	@Id
    private Long id;

    //任务接口 : url 后缀
    private String taskInterface;

   //任务模块名称
    private String taskModelName;

   //任务执行时间
    private Date taskDate;

    //任务所属表主键
    private Long taskTableId;

    //触发状态：  0 未触发, 1 已加载, 2 已触发, 3 修改, 4已停止, 5失败的任务
    private Integer status;

    //任务执行的项目平台
    private String taskProjectPlatform;
    
    
    //任务执行的所传的参数
    private String taskProjectParam;

    
    public Long getId() {
        return id;
    }

  
    public void setId(Long id) {
        this.id = id;
    }

  
    public String getTaskInterface() {
        return taskInterface;
    }

   
    public void setTaskInterface(String taskInterface) {
        this.taskInterface = taskInterface == null ? null : taskInterface.trim();
    }

    /**
     * This method was generated by Apache iBATIS Ibator.
     * This method returns the value of the database column tc_task_info.task_model_name
     *
     * @return the value of tc_task_info.task_model_name
     *
     * @ibatorgenerated Mon Sep 19 09:56:15 GMT+08:00 2016
     */
    public String getTaskModelName() {
        return taskModelName;
    }

    /**
     * This method was generated by Apache iBATIS Ibator.
     * This method sets the value of the database column tc_task_info.task_model_name
     *
     * @param taskModelName the value for tc_task_info.task_model_name
     *
     * @ibatorgenerated Mon Sep 19 09:56:15 GMT+08:00 2016
     */
    public void setTaskModelName(String taskModelName) {
        this.taskModelName = taskModelName == null ? null : taskModelName.trim();
    }

    /**
     * This method was generated by Apache iBATIS Ibator.
     * This method returns the value of the database column tc_task_info.task_date
     *
     * @return the value of tc_task_info.task_date
     *
     * @ibatorgenerated Mon Sep 19 09:56:15 GMT+08:00 2016
     */
    public Date getTaskDate() {
        return taskDate;
    }

    /**
     * This method was generated by Apache iBATIS Ibator.
     * This method sets the value of the database column tc_task_info.task_date
     *
     * @param taskDate the value for tc_task_info.task_date
     *
     * @ibatorgenerated Mon Sep 19 09:56:15 GMT+08:00 2016
     */
    public void setTaskDate(Date taskDate) {
        this.taskDate = taskDate;
    }

    /**
     * This method was generated by Apache iBATIS Ibator.
     * This method returns the value of the database column tc_task_info.task_table_id
     *
     * @return the value of tc_task_info.task_table_id
     *
     * @ibatorgenerated Mon Sep 19 09:56:15 GMT+08:00 2016
     */
    public Long getTaskTableId() {
        return taskTableId;
    }

    /**
     * This method was generated by Apache iBATIS Ibator.
     * This method sets the value of the database column tc_task_info.task_table_id
     *
     * @param taskTableId the value for tc_task_info.task_table_id
     *
     * @ibatorgenerated Mon Sep 19 09:56:15 GMT+08:00 2016
     */
    public void setTaskTableId(Long taskTableId) {
        this.taskTableId = taskTableId;
    }

    /**
     * This method was generated by Apache iBATIS Ibator.
     * This method returns the value of the database column tc_task_info.status
     *
     * @return the value of tc_task_info.status
     *
     * @ibatorgenerated Mon Sep 19 09:56:15 GMT+08:00 2016
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * This method was generated by Apache iBATIS Ibator.
     * This method sets the value of the database column tc_task_info.status
     *
     * @param status the value for tc_task_info.status
     *
     * @ibatorgenerated Mon Sep 19 09:56:15 GMT+08:00 2016
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * This method was generated by Apache iBATIS Ibator.
     * This method returns the value of the database column tc_task_info.task_project_platform
     *
     * @return the value of tc_task_info.task_project_platform
     *
     * @ibatorgenerated Mon Sep 19 09:56:15 GMT+08:00 2016
     */
    public String getTaskProjectPlatform() {
        return taskProjectPlatform;
    }

    /**
     * This method was generated by Apache iBATIS Ibator.
     * This method sets the value of the database column tc_task_info.task_project_platform
     *
     * @param taskProjectPlatform the value for tc_task_info.task_project_platform
     *
     * @ibatorgenerated Mon Sep 19 09:56:15 GMT+08:00 2016
     */
    public void setTaskProjectPlatform(String taskProjectPlatform) {
        this.taskProjectPlatform = taskProjectPlatform == null ? null : taskProjectPlatform.trim();
    }

    /**
     * This method was generated by Apache iBATIS Ibator.
     * This method corresponds to the database table tc_task_info
     *
     * @ibatorgenerated Mon Sep 19 09:56:15 GMT+08:00 2016
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TcTaskInfo other = (TcTaskInfo) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTaskInterface() == null ? other.getTaskInterface() == null : this.getTaskInterface().equals(other.getTaskInterface()))
            && (this.getTaskModelName() == null ? other.getTaskModelName() == null : this.getTaskModelName().equals(other.getTaskModelName()))
            && (this.getTaskDate() == null ? other.getTaskDate() == null : this.getTaskDate().equals(other.getTaskDate()))
            && (this.getTaskTableId() == null ? other.getTaskTableId() == null : this.getTaskTableId().equals(other.getTaskTableId()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getTaskProjectPlatform() == null ? other.getTaskProjectPlatform() == null : this.getTaskProjectPlatform().equals(other.getTaskProjectPlatform()));
    }

    /**
     * This method was generated by Apache iBATIS Ibator.
     * This method corresponds to the database table tc_task_info
     *
     * @ibatorgenerated Mon Sep 19 09:56:15 GMT+08:00 2016
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTaskInterface() == null) ? 0 : getTaskInterface().hashCode());
        result = prime * result + ((getTaskModelName() == null) ? 0 : getTaskModelName().hashCode());
        result = prime * result + ((getTaskDate() == null) ? 0 : getTaskDate().hashCode());
        result = prime * result + ((getTaskTableId() == null) ? 0 : getTaskTableId().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getTaskProjectPlatform() == null) ? 0 : getTaskProjectPlatform().hashCode());
        return result;
    }


	public String getTaskProjectParam() {
		return taskProjectParam;
	}


	public void setTaskProjectParam(String taskProjectParam) {
		this.taskProjectParam = taskProjectParam;
	}
}